/*
 *
 *      Copyright (c) 2018-2025, proj All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: proj
 *
 */

package com.ykht.proj.coupon.api.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ykht.proj.common.core.constant.ServiceNameConstants;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.CnShop;
import com.ykht.proj.coupon.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


/**
 * 门店api
 * @author proj
 * @date 2018/6/22
 */
@FeignClient(contextId = "remoteShopService", value = ServiceNameConstants.COUPON_SERVICE)
public interface RemoteShopService {


	/**
	 * 判断用户是否已 绑定 公司或者门店
	 * @param map 参数
	 * @return R
	 */
	@PostMapping("/c/shop/getBindingResources")
	R<List<Integer>> getBindingResources(@RequestBody Map<String, Object> map);


	@PostMapping("/c/shop/shopDetailByIds")
	Page<AboutShopVo> shopByIds(@RequestBody AboutShopReq req);

	/**
	 * 获取登录人的门店信息
	 * @param
	 * @return R
	 */
	@PostMapping("/b/cnshop/getByLoginIdShop")
	CnShop getByLoginIdShop();


	/**
	 * 根据ID集合 获取门店
	 * @param ids
	 * @return R
	 */
	@PostMapping("/b/cnshop/getByIds")
	List<CnShop> getByIds(@RequestBody String[] ids);
	@PostMapping("/cnshop/getByShopIds")
	List<CnShop> getByShopIds(@RequestParam("shopIds") List<Long> shopIds);


	/**
	 * 获取登录人的门店信息
	 * @param
	 * @return R
	 */
	@PostMapping("/b/cnshop/getById/{id}")
	CnShop getById(@PathVariable("id") Long id);
//	@GetMapping("shop/distanceList")
//	List<CnShopDisVo> distanceList(BaseLonLat baseLonLat);
	@PostMapping("c/shop/distanceList")
	R<List<CnShopDisVo>> distanceList(@RequestBody ShopDisListVo shopDisListVo);

	/**
	 * 根据门店ID获取全部门店信息
	 * @param
	 * @return R
	 */
	@PostMapping("/b/cnshop/getByShopId/{shopId}")
	CnShopVo getByShopId(@PathVariable("shopId") Long shopId);

}
